package com.luhuiguo.cms.shared.model;

import com.extjs.gxt.ui.client.data.BaseTreeModel;

public class ChannelTreeModel extends BaseTreeModel {

    private static final long serialVersionUID = 6972044723212854359L;

    public static final String ID = "id";

    public static final String NAME = "name";

    public static final String TITLE = "title";

    public static final String RANK = "rank";

    public static final String TYPE = "type";

    public static final String STATUS = "status";

    public static final String ALLOW_POST = "allowPost";

    public static final String ALLOW_VIEW = "allowView";

    public static final String ALLOW_COMMENT = "allowComment";

    public Long getId() {
        return get(ID);
    }

    public void setId(Long id) {
        set(ID, id);
    }

    public String getName() {
        return get(NAME);
    }

    public void setName(String name) {
        set(NAME, name);
    }

    public String getTitle() {
        return get(TITLE);
    }

    public void setTitle(String title) {
        set(TITLE, title);
    }

    public Integer getRank() {
        return get(RANK);
    }

    public void setRank(Integer rank) {
        set(RANK, rank);
    }

    public Integer getType() {
        return get(TYPE);
    }

    public void setType(Integer type) {
        set(TYPE, type);
    }

    public Integer getStatus() {
        return get(STATUS);
    }

    public void setStatus(Integer status) {
        set(STATUS, status);
    }

    public Boolean isAllowPost() {
        return get(ALLOW_POST);
    }

    public void setAllowPost(Boolean allowPost) {
        set(ALLOW_POST, allowPost);
    }

    public Boolean isAllowView() {
        return get(ALLOW_VIEW);
    }

    public void setAllowView(Boolean allowView) {
        set(ALLOW_VIEW, allowView);
    }

    public Boolean isAllowComment() {
        return get(ALLOW_COMMENT);
    }

    public void setAllowComment(Boolean allowComment) {
        set(ALLOW_COMMENT, allowComment);
    }

    @Override
    public String toString() {
        StringBuilder builder = new StringBuilder();
        builder.append("ChannelTreeModel [getId()=").append(getId()).append(", getName()=").append(getName()).append(
                ", getRank()=").append(getRank()).append(", getStatus()=").append(getStatus()).append(", getTitle()=")
                .append(getTitle()).append(", getType()=").append(getType()).append("]");
        return builder.toString();
    }

}
